{template "header.html", "/"}

<div class="page-container">
    <div class="page-content-wrapper">

        <div class="page-content">
            <div class="container">

                <ul class="page-breadcrumb breadcrumb">
                    <li><a href="{SITE_URL}">首页</a><i class="fa fa-angle-right"></i></li>
                    <li><a href="{MODULE_URL}">{MODULE_NAME}</a><i class="fa fa-angle-right"></i></li>
                    {dr_catpos($catid, '', 1, '<li><a href="{url}">{name}</a><i class="fa fa-angle-right"></i></li>'.PHP_EOL)}
                    <li> <span>搜索</span></li>
                </ul>


                <div class="news-search">
                    <div class="news-search-param">
                        <div class="news-search-param-name">栏目分类：</div>
                        <div class="news-search-param-value">
                            <a class="label {if !$catid || $cat.child}label-success{else}label-default{/if}" href="{dr_search_url($params, 'catid', NULL)}">不限</a>
                            <!--调用栏目分类，这种用法只能用于模块列表与搜索页面-->
                            {loop $related $t}
                            <a class="label {if $t.id==$catid}label-success{else}label-default{/if}" href="{dr_search_url($params, 'catid', $t.id)}">{$t.name}</a>
                            {/loop}
                        </div>
                    </div>
                    <div class="news-search-param">
                        <div class="input-group">
                            <input type="text" placeholder="输入关键字搜索" onkeypress="if(event.keyCode==13) {searchByClass();return false;}" name='keyword' value='{$keyword}' id='dr_search_keyword' class="form-control">
                            <span class="input-group-btn"> <button class="btn default"  onclick="searchByClass()" type="button"> <i class="fa fa-search"></i> 搜索 </button> </span>
                            <script type="text/javascript">
                                function searchByClass(){
                                    var url="{dr_search_url($params, 'keyword', 'phpkaiyuancms')}";
                                    var value=$("#dr_search_keyword").val();
                                    if (value) {
                                        location.href=url.replace('phpkaiyuancms', value);
                                    } else {
                                        dr_tips("输入关键字");
                                    }
                                }
                            </script>
                        </div>
                    </div>
                </div>


                <div class="news-content row">

                    <div class="col-md-8">
                        <div class="search-content">
                            <div class="title">
                                <div class="tabs clearfix">
                                    <ul>
                                        <li class="{if !$get.order || $get.order=='updatetime'}selected{/if}"><a href="{dr_search_url($params, 'order', null)}">时间排序</a></li>
                                        <li class="{if $get.order=='hits'}selected{/if}"><a href="{dr_search_url($params, 'order', 'hits')}">点击排序</a></li>
                                        <li class="{if $get.order=='comments'}selected{/if}"><a href="{dr_search_url($params, 'order', 'comments')}">评论排序</a></li>
                                    </ul>
                                </div>
                                <div class="fr clearfix">
                                    <span class="fl">共有</span><em>{$sototal}</em>条数据
                                </div>
                            </div>
                        {if $searchid}
                            <div class="book-content-list">
                                <ul class="books" style="border: 0">
                                    <!--最新10条数据-->
                                    {search order=$params.order id=$searchid total=$sototal catid=$catid page=1 pagesize=10 urlrule=$urlrule}
                                    {if $key%2==0}
                                    <li class="clearfix">
                                        {/if}
                                        <div class="book clearfix">
                                            <a href="{$t.url}">
                                                <div class="scal oh clearfix bookShadow fl" style="width: 100px; height: 138px;"><img src="{dr_thumb($t.thumb, 100, 140)}" class="fl"></div>
                                            </a>
                                            <div class="bookDetail">
                                                <div class="bookName text-overflow"><a href="{$t.url}">{dr_strcut($t.title, 20)}</a></div>
                                                <div class="detail">{dr_strcut($t.description, 60)}</div>
                                                <div class="typeAuthor fl text-overflow">
                                                    <span><a href="{dr_cat_value($t.catid, 'name')}">{dr_cat_value($t.catid, 'name')}</a></span>
                                                    <span>{$t.updatetime}</span>
                                                </div>
                                            </div>
                                        </div>
                                        {if $key%2==1 || $is_last}
                                    </li>
                                    {/if}
                                    {/search}
                                </ul>
                            </div>
                            <div class="news-list-pagination">
                                <ul class="pagination">
                                    {$pages}
                                </ul>
                            </div>
                        {else}
                        <div class="no-feed"> <div class="empty-img"> <img src="{HOME_THEME_PATH}pc/img/empty_result.png" alt="404"> </div> <p>在这个星球中找不到</p> </div>
                        {/if}

                        </div>
                    </div>

                    <div class="col-md-4">


                        <div class="recommend ">
                            <div class="title clearfix">
                                下载排行榜
                            </div>
                            <ul class="recommendCon week">
                                {module catid=$catid order=hits num=10}
                                {if $key == 0}
                                <li class="text-overflow clearfix">
                                    <a href="{$t.url}">
                                        <span class="fl">1</span>
                                        <div class="scal oh clearfix bookShadow fl" style="width: 48px; height: 64px;"><img class="fl" src="{dr_thumb($t.thumb, 50, 70)}"></div>
                                        <div class="fl bookContent">
                                            <div class="bookName text-overflow">{dr_strcut($t.title, 20)}</div>
                                            <div class="bookType text-overflow">{dr_cat_value($t.catid, 'name')}</div>
                                            <div class="bookAuthor text-overflow">{$t.schedule}</div>
                                        </div>
                                    </a>
                                </li>
                                {else}
                                <li class="text-overflow"><a href="{$t.url}"><span>{$key+1}</span>{dr_strcut($t.title, 20)}</a></li>
                                {/if}
                                {/module}

                            </ul>

                        </div>

                        <div class="recommend mt20">
                            <div class="title clearfix">
                                评论排行榜
                            </div>
                            <ul class="recommendCon week">
                                {module catid=$catid order=comments num=10}
                                {if $key == 0}
                                <li class="text-overflow clearfix">
                                    <a href="{$t.url}">
                                        <span class="fl">1</span>
                                        <div class="scal oh clearfix bookShadow fl" style="width: 48px; height: 64px;"><img class="fl" src="{dr_thumb($t.thumb, 50, 70)}"></div>
                                        <div class="fl bookContent">
                                            <div class="bookName text-overflow">{dr_strcut($t.title, 20)}</div>
                                            <div class="bookType text-overflow">{dr_cat_value($t.catid, 'name')}</div>
                                            <div class="bookAuthor text-overflow">{$t.schedule}</div>
                                        </div>
                                    </a>
                                </li>
                                {else}
                                <li class="text-overflow"><a href="{$t.url}"><span>{$key+1}</span>{dr_strcut($t.title, 20)}</a></li>
                                {/if}
                                {/module}
                            </ul>
                        </div>


                    </div>


                </div>

            </div>
        </div>

    </div>

</div>


{template "footer.html", "/"}